<?php
require_once 'BaseController.php';

/**
 * 店舗お問合せ確認画面コントローラクラス<br />
 *
 * @package apamanshop
 * @author K.Ikenaga
 * @copyright　
 */
class Inquiry_ShopcnfController extends Inquiry_BaseController
	{
		/**
		 * インデックスアクション
		 *
		 */
		public function indexAction(){

			// パラメータの取得
			//$this->_params = $this->getParameters();

			/* 2011/07/22　AKBｷｬﾝﾍﾟｰﾝ：加盟店ﾒﾝﾊﾞｰｻｲﾄ追加対応 */
			//加盟店ページからの遷移時は既存ヘッダを非表示（キャンペーン用ヘッダに切り替える為）
			if($this->_params['shoppage']){
				// ヘッダー・フッターを表示しないようにする
				$this->setXPassThroutgh();
				//表示テンプレートパス
				$this->_display_path = APPLICATION_PATH.'/modules/inquiry/views/scripts/nohead.tpl';
			}else{
				//表示テンプレートパス
				$this->_display_path = APPLICATION_PATH.'/modules/inquiry/views/scripts/estate.tpl';
			}


//__log_debug('★★店舗お問い合わせ確認画面パラム★★'  );
//__log_debug('★1必要★' . $this->_params['CntctWayFax'].'★1★' );
//__log_debug('★2必要★' . $this->_params['CntctWayMail'].'★2★' );
//__log_debug('★3必要★' . $this->_params['CntctWayTel'].'★3★' );
//__log_debug('★4★' . $this->_params['CntctWayCd'].'★4★' );
//__log_debug('★5★' . $this->_params['CntctWayStr'].'★5★' );
//__log_debug('★6必要★' . $this->_params['Fax'].'★6★' );
//__log_debug('★7必要★' . $this->_params['Inquiry1'].'★7★' );
//__log_debug('★8必要★' . $this->_params['Inquiry2'].'★8★' );
//__log_debug('★9必要★' . $this->_params['Inquiry3'].'★9★' );
//__log_debug('★10必要★' . $this->_params['Inquiry4'].'★10★' );
//__log_debug('★11★' . $this->_params['Inquiry5'].'★11★' );
//__log_debug('★12必要★' . $this->_params['Mail'].'★12★' );
//__log_debug('★13★' . $this->_params['MailMgznFlg'].'★13★' );
//__log_debug('★14★' . $this->_params['Name'].'★14★' );
//__log_debug('★15必要★' . $this->_params['NameMei'].'★15★' );
//__log_debug('★16必要★' . $this->_params['NameSei'].'★16★' );
//__log_debug('★17★' . $this->_params['KanaSei'].'★17★' );
//__log_debug('★18★' . $this->_params['KanaMei'].'★18★' );
//__log_debug('★19必要★' . $this->_params['NeedTimeKbn'].'★19★' );
//__log_debug('★20必要★' . $this->_params['PlaceKbn'].'★20★' );
//__log_debug('★21必要★' . $this->_params['ShopCd'].'★21★' );
//__log_debug('★22必要★' . $this->_params['Tel'].'★22★' );
//__log_debug('★23必要★' . $this->_params['UseKbn'].'★23★' );
//__log_debug('★24★' . $this->_params['SrhKbn'].'★24★' );
//__log_debug('★25★' . $this->_params['OemCd'].'★25★' );
//__log_debug('★26★' . $this->_params['Url'].'★26★' );
//__log_debug('★27★' . $this->_params['Company'].'★27★' );
//__log_debug('★28★' . $this->_params['CtgryCd'].'★28★' );
//__log_debug('★29★' . $this->_params['ClaimTgtKbn'].'★29★' );
//__log_debug('★30★' . $this->_params['Mrrg'].'★30★' );
//__log_debug('★31★' . $this->_params['MrrgNm'].'★31★' );
//__log_debug('★32★' . $this->_params['BuyExp'].'★32★' );
//__log_debug('★33★' . $this->_params['BuyExpNm'].'★33★' );
//__log_debug('★34必要★' . $this->_params['Comment'].'★34★' );
//__log_debug('★35★' . $this->_params['Other'].'★35★' );
//__log_debug('★36★' . $this->_params['SiteKbn'].'★36★' );
//__log_debug('★37★' . $this->_params['Address'].'★37★' );
//__log_debug('★38★' . $this->_params['Address1'].'★38★' );
//__log_debug('★39★' . $this->_params['Address2'].'★39★' );
//__log_debug('★40★' . $this->_params['JobKbn'].'★40★' );
//__log_debug('★41★' . $this->_params['JobNm'].'★41★' );
//__log_debug('★42★' . $this->_params['Sex'].'★42★' );
//__log_debug('★43★' . $this->_params['SexNm'].'★43★' );
//__log_debug('★44★' . $this->_params['Charge'].'★44★' );
//__log_debug('★45★' . $this->_params['ChargeNm'].'★45★' );
//__log_debug('★46★' . $this->_params['ChargeNmKana'].'★46★' );
//__log_debug('★47★' . $this->_params['TenpoNm'].'★47★' );
//__log_debug('★48★' . $this->_params['TenpoMail'].'★48★' );
//__log_debug('★49★' . $this->_params['PrefCd'].'★49★' );
//__log_debug('★50★' . $this->_params['PrefName'].'★50★' );
//__log_debug('★51★' . $this->_params['AgeKbn'].'★51★' );
//__log_debug('★52★' . $this->_params['AgeNm'].'★52★' );
//__log_debug('★53★' . $this->_params['Busho'].'★53★' );
//__log_debug('★54★' . $this->_params['BukkenCd'].'★54★' );
//__log_debug('★55★' . $this->_params['Matrix'].'★55★' );
//__log_debug('★56★' . $this->_params['Yakushoku'].'★56★' );
//__log_debug('★57★' . $this->_params['Zip'].'★57★' );
//__log_debug('★58★' . $this->_params['Zip1'].'★58★' );
//__log_debug('★59★' . $this->_params['Zip2'].'★59★' );
//__log_debug('★60★' . $this->_params['AllTenpoNm'].'★60★' );
//__log_debug('★61★' . $this->_params['TargetKbn'].'★61★' );
//__log_debug('★62★' . $this->_params['TargetNm'].'★62★' );
//__log_debug('★63★' . $this->_params['ComId'].'★63★' );
//__log_debug('★64★' . $this->_params['HikkoshiRiyuuText'].'★64★' );
//__log_debug('★65★' . $this->_params['HikkoshiRiyuu'].'★65★' );
//__log_debug('★66★' . $this->_params['HikkoshiRiyuuSonota'].'★66★' );
//__log_debug('★67★' . $this->_params['NeedTokushuuText'].'★67★' );
//__log_debug('★68★' . $this->_params['NeedTokushuu'].'★68★' );
//__log_debug('★69★' . $this->_params['NeedTokushuuSonota'].'★69★' );
//__log_debug('★70★' . $this->_params['KounyuuKeikenText'].'★70★' );
//__log_debug('★71★' . $this->_params['KounyuuKeiken'].'★71★' );
//__log_debug('★72★' . $this->_params['SonotaZassiText'].'★72★' );
//__log_debug('★73★' . $this->_params['SonotaZassi'].'★73★' );
//__log_debug('★74★' . $this->_params['SonotaZassiName'].'★74★' );
//__log_debug('★75★' . $this->_params['SoufuKibouJyouhoushiText'].'★75★' );
//__log_debug('★76★' . $this->_params['SoufuKibouJyouhoushi'].'★76★' );
//__log_debug('★77★' . $this->_params['KikkakeText'].'★77★' );
//__log_debug('★78★' . $this->_params['Kikkake'].'★78★' );
//__log_debug('★79★' . $this->_params['KikkakeSonota'].'★79★' );
//__log_debug('★80★' . $this->_params['JyuushiKoumokuText'].'★80★' );
//__log_debug('★81★' . $this->_params['JyuushiKoumoku'].'★81★' );
//__log_debug('★82★' . $this->_params['JyuushiKoumokuSonota'].'★82★' );
//__log_debug('★83★' . $this->_params['FavFlg'].'★83★' );
//__log_debug('★84★' . $this->_params['Did'].'★84★' );
//__log_debug('★85★' . $this->_params['Sid'].'★85★' );
//__log_debug('★86★' . $this->_params['UAKbn'].'★86★' );
//__log_debug('★87★' . $this->_params['CampaignLocationFlg'].'★87★' );
//__log_debug('★88★' . $this->_params['TimeStr'].'★88TimeStr★' );

	        //=====表示用共通パラメータ設定=====
			$this->setCommonParams();
			$this->setSubParams();
			$this->_data =  $this->_params;

			//===キャンペーン情報取得===
			$this->setCampaignParams("2, 4", 2);

			/* 2011/07/22　AKBｷｬﾝﾍﾟｰﾝ：加盟店ﾒﾝﾊﾞｰｻｲﾄ追加対応 */
			//加盟店ページより遷移時はヘッダを付与する
			if($this->_params['shoppage']){
				// 外部モデル呼び出し設定
				$loader = new Zend_Application_Module_Autoloader(array(
					'namespace' => 'Shop',
					'basePath' => APPLICATION_PATH . '/modules/shop',
				));
				$this->_model_shop = new Shop_Model_Detail();
				// 店舗詳細情報取得
				$shopDtlList = $this->_model_shop->getList($this->_params);
				// 表示用に変換
				$this->_data['shopDtl'] = $this->_model_shop->convertData($shopDtlList[0]);
				//ブロック設定
				$this->setBlockShoppageHeader();
				//パンくずの生成
				$this->_data['breadcrumb'] = $this->_breadcrumb->generateBreadcrumb();
		        $this->_data['breadcrumb'] = '<li>'.str_replace('><','></li><li><',$this->_data['breadcrumb']).'</li>';
			}

			//ブロック設定
			$this->setBlockShopScript();
			$this->setSubblockHpCommon();
			$this->setBlock($this->_shopcnf_helper);

			//表示
			$this->display($this->_display_path);
		}

		/**
		 * 店舗お問合せ画面共通パラメータ設定
		 *
		 */
			private function setSubParams()
		{
			//=====タイトル=====
			$this->setTitle('賃貸情報アパマンショップ[店舗お問い合わせ]');

			//=====フッタのトップへ戻るコメント=====
			$this->_params['footerTitle'] = '店舗お問い合わせページ';

			//=====タイトルバー設定=====
			$this->_params['contentsTitle'] = '店舗検索　≫　お問い合わせ確認';

			$this->_breadcrumb->add('お問い合わせ ', $this->_sslurl . 'inquiry/shopentry');
	        $this->setBreadCrumb($this->_breadcrumb->generateBreadcrumb());

		}

	}
?>